package impl

import (
	"context"
	"github.com/starmotioncf/soutchatinternal/model"
	"github.com/starmotioncf/soutchatinternal/repository"
)

type walletRepository struct {
	*repository.Repository
}

func NewWalletRepository(r *repository.Repository) repository.WalletRepository {
	return &walletRepository{
		Repository: r,
	}
}

func (r *walletRepository) Get(ctx context.Context, uid uint64) (m *model.User, err error) {
	err = r.DB(ctx).Where("uid = ?", uid).Find(&m).Error
	return
}
